﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Invoice.aspx.cs" Inherits="Web.Accounting.Invoice" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>付款单发票录入页面</title>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server" />

    <div>
    付款单【<asp:Label ID="lblReconcilationNo" runat="server"></asp:Label>】信息
    </div>
    <table>
    <tr>
    <td>当前开票总金额：<ext:Label ID="lblPaidPrice" runat="server">3000.20</ext:Label></td>
    <td>应付款金额：<ext:Label ID="lblTotalPrice" runat="server">3000.20</ext:Label></td>
    <td>还需录入：<ext:Label ID="lblNeededPrice" runat="server">3000.20</ext:Label></td>
    </tr>
    <tr>
    <td>            <ext:Button ID="btnSendToChecker" runat="server" Text="提交所有发票给对帐员" 
            onclick="btnSendToChecker_Click" >   
            </ext:Button>  
</td>
    </tr>
    </table>
    <div>发票一览表</div>
                    <ext:Grid ID="GridResult" Title="PaymentList" PageSize="20" ShowBorder="false" 
                        ShowHeader="False" AutoHeight="true"
                        runat="server" EnableCheckBoxSelect="false" DataKeyNames="InvoiceNo" 
                        IsDatabasePaging="true" AllowPaging="false" AllowSorting="false"
                        EnableRowNumber="false" 
        onrowcommand="GridResult_RowCommand">
                        <Columns>
                            <ext:LinkButtonField HeaderText="&nbsp;" Width="60px" CommandName="Change" Text="修改" />
                            <ext:LinkButtonField HeaderText="&nbsp;" Width="60px" ConfirmText="你确定要这么做么？" ConfirmTarget="Top"
                                CommandName="Delete" Text="删除" />
                             <ext:BoundField Width="100px" DataField="InvoiceNo" DataFormatString="{0}" HeaderText="发票No" />                     
                             <ext:BoundField Width="100px" DataField="InvoiceType" DataFormatString="{0}" HeaderText="发票类型" />                     
                            <ext:BoundField Width="60px" DataField="InvoiceDate" HeaderText="发票开票日" />
                             <ext:BoundField Width="60px" DataField="ValueAddedTax" HeaderText="增值税" />
                            <ext:TemplateField Width="60px" HeaderText="税率类型">
                                <ItemTemplate>
                                    <%-- Container.DataItem 的类型是 System.Data.DataRowView 或者用户自定义类型 --%>
                                    <%--<asp:Label ID="Label6" runat="server" Text='<%# GetStatusName(Eval("TaxType")) %>'></asp:Label>--%>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("TaxType") %>'></asp:Label>
                                </ItemTemplate>
                            </ext:TemplateField>
                             <ext:BoundField Width="60px" DataField="Price" HeaderText="价额" />
                             <ext:BoundField Width="60px" DataField="TotalPrice" HeaderText="价税合计" />                             
                             <ext:BoundField Width="100px" DataField="memo" DataFormatString="{0}" HeaderText="发票说明" />
                        </Columns>
                    </ext:Grid>
    <div>发票录入</div>
    <ext:Form ID="Form2" runat="server" BodyPadding="5px" EnableBackgroundColor="true"
        Title="发票录入">
        <Rows>
            <ext:FormRow ID="FormRow1" runat="server">
            <Items>
            <ext:TextBox ID="txtInvoiceNo" runat="server" Label="发票号:" Text="" 
                    ShowRedStar="True" MaxLength="8" Required="true" RequiredMessage="请输入发票号">
                </ext:TextBox> 
            </Items>
            </ext:FormRow>
            
            <ext:FormRow ID="FormRow2" runat="server">
            <Items>
            <ext:TextBox ID="txtInvoiceType" runat="server" Label="发票类型:" Text=""  Required="true" RequiredMessage="请输入发票类型"
                    ShowRedStar="True"  MaxLength="10">
                </ext:TextBox> 
            </Items>
            </ext:FormRow>
            
            <ext:FormRow ID="FormRow3" runat="server">
            <Items> 
            <ext:DatePicker ID="DatePickerInvoiceDate" runat="server" Label="开票日期:"  Required="true" RequiredMessage="请输入开票日期">
            </ext:DatePicker>
            </Items>
            </ext:FormRow>
      
            <ext:FormRow ID="FormRow4" runat="server">
            <Items>
                <ext:DropDownList ID="ddlTaxType" runat="server" Label="税率:" >
                <ext:ListItem Text="17.00%" Value="0.1700" Selected="true"/>
                <ext:ListItem Text="14.94%" Value="0.1494"/>
                <ext:ListItem Text="0%" Value="0.00"/>
                </ext:DropDownList>
            </Items>
            </ext:FormRow>
       
            <ext:FormRow ID="FormRow5" runat="server">
            <Items>
            <ext:TextBox ID="txtValueAddedTax" runat="server" Label="增值税额" Text="" 
                    ShowRedStar="True" MaxLength="22" Required="true" RequiredMessage="请输入增值税额">
                </ext:TextBox> 
            </Items>
            </ext:FormRow>
            
            <ext:FormRow ID="FormRow8" runat="server">
            <Items>
            <ext:TextBox ID="txtPrice" runat="server" Label="价额:" Text="" Required="true" RequiredMessage="请输入价额"
                    ShowRedStar="True" MaxLength="22" Width="60px">
                </ext:TextBox> 
            </Items>
            </ext:FormRow>
            
            <ext:FormRow ID="FormRow6" runat="server">
            <Items>
            <ext:TextBox ID="txtTotalPrice" runat="server" Label="价税合计:" Text=""  Required="true" RequiredMessage="请输入价税合计"
                    ShowRedStar="True" MaxLength="22">
                </ext:TextBox> 
            </Items>
            </ext:FormRow>
           
            <ext:FormRow ID="FormRow7" runat="server">
            <Items>
            <ext:TextArea  ID="TextAreaMemo"  runat="server" Label="发票说明:" Text="" 
                    ShowRedStar="True">
            </ext:TextArea> 
            </Items>
            </ext:FormRow>  
            
            <ext:FormRow ID="FormRow9" runat="server">
            <Items>
            <ext:Button ID="Submit" runat="server" Text="保存修改当前发票" OnClick="Submit_Click">   
            </ext:Button>  
            </Items>
            </ext:FormRow>  
                       
        </Rows>
        
    </ext:Form>
    </form>
</body>
</html>
